package com.jtbd.controller;

import com.jtbd.dto.request.CourseClassItemHttpDto;
import com.jtbd.dto.result.ResponseBaseData;
import com.jtbd.service.CourseClassManagementService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/courseClass")
@Tag(name = "课程班级管理接口")
public class CourseClassManagementController {
    @Resource
    private CourseClassManagementService courseClassManagementService;

    @PostMapping("/addCourseClass")
    @Operation(summary = "添加课程班级")
    public ResponseBaseData<Long> addCourseClass(@Validated @RequestBody CourseClassItemHttpDto courseClassItemHttpDto) {
        return ResponseBaseData.success(courseClassManagementService.addCourseClass(courseClassItemHttpDto));
    }
}
